package com.hula.onion.book.server.service;

import org.apache.http.client.protocol.HttpClientContext;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Description:
 * Create Date:2018/1/18 16:46
 *
 * @author liangbing
 * @version 1.0
 */
public interface AutoSyncService {

    /**
     * 自动同步
     *
     * @param userName
     * @param password
     * @param ticket
     * @param platformId
     * @param userId
     * @param request
     * @param response
     * @return
     */
    String doAutoSync(String userName, String password,
                      String ticket, int platformId,
                      String userId, HttpServletRequest request, HttpServletResponse response);

    /**
     * 手动同步接口
     *
     * @param platformId
     * @param userId
     * @param amount
     * @param totalIncome
     * @param waitIncome
     * @return
     */
    String doManualSync(int platformId, String userId, String amount, String totalIncome, String waitIncome);

    /**
     * 获取平台验证码
     *
     * @param platformId
     * @param response
     * @param userFlag
     * @return
     */
    HttpClientContext getCaptcha(int platformId, String userFlag, HttpServletResponse response);

    /**
     * 删除同步数据
     *
     * @param id
     * @return
     */
    String doDelSyncInfo(int id);
}
